<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt" %>

<fmt:setBundle basename="ApplicationResources" />

<table cellspacing="2" cellpadding="2" border="1" width="100%">

  <c:choose>
    <c:when test="${empty subordinateEmployees}">
      <tr class="listRecord">
        <td><fmt:message key="caption.noEmployees"/></td>
      </tr>
    </c:when>
    <c:otherwise>
      <tr>
        <th class="listSectionHeading">
          <fmt:message key="caption.chooseEmployee"/>
        </th>
      </tr>
      <c:forEach var="employee" items="${subordinateEmployees}">
        <tr class="listRecord">
          <td>
            <c:url var="url" value="/protected/employeeHistory.do">
              <c:param name="employee_id" value="${employee.employeeId}" />
            </c:url>
            <a href="<c:out value="${url}"/>">
              <c:out value="${employee.name}"/>
            </a>
          </td>
        </tr>
      </c:forEach>
    </c:otherwise>
  </c:choose>
</table>
